
import 'package:flutterlib/common/constants/constants.dart';



class ThemeGroup {
  const ThemeGroup({
    this.lightThemeColor = QuhuiColors.mainThemeColor,
    this.lightPrimaryColor = QuhuiColors.miWhite,
    this.lightBackgroundColor = QuhuiColors.white,
    this.lightIconUnselectedColor = const Color(0xffc4c4c4),
    this.lightDividerColor = QuhuiColors.dividerColor,
    this.lightPrimaryTextColor = QuhuiColors.mainTextColor,
    this.lightSecondaryTextColor = QuhuiColors.subTextColor,
    this.lightButtonTextColor = QuhuiColors.white,


    this.darkThemeColor = QuhuiColors.primaryDarkValue,
    this.darkPrimaryColor = const Color(0xff212121),
    this.darkBackgroundColor = const Color(0xff151515),
    this.darkIconUnselectedColor = const Color(0xff616161),
    this.darkDividerColor = const Color(0xff313131),
    this.darkPrimaryTextColor = const Color(0xffb4b4b6),
    this.darkSecondaryTextColor = const Color(0xff878787),
    this.darkButtonTextColor = Colors.white,
  });

  final Color lightThemeColor;
  final Color lightPrimaryColor;
  final Color lightBackgroundColor;
  final Color lightIconUnselectedColor;
  final Color lightDividerColor;
  final Color lightPrimaryTextColor;
  final Color lightSecondaryTextColor;
  final Color lightButtonTextColor;

  final Color darkThemeColor;
  final Color darkPrimaryColor;
  final Color darkBackgroundColor;
  final Color darkIconUnselectedColor;
  final Color darkDividerColor;
  final Color darkPrimaryTextColor;
  final Color darkSecondaryTextColor;
  final Color darkButtonTextColor;
}

const ThemeGroup defaultThemeGroup = ThemeGroup();

Color adaptiveButtonColor([Color color]) {
  if (currentIsDark) {
    return currentThemeGroup.darkButtonTextColor;
  } else {
    return currentThemeGroup.lightButtonTextColor ?? color;
  }
}
